#include<stdio.h>
#include<string.h>
int main(void)
{
    char ch1[6];
    char ch2[6];
    int b = 0;



    scanf("%s",ch1);
    while (ch1[0] != '*')
    {   
        int a = 0;
        for (int i = 0; ch1[i] != '\0'; i++)
        {
            a += ch1[i];
        }
        if (a>b)
        {
            b = a;
            strcpy(ch2,ch1);
        }
        scanf("%s",ch1);
    }
    printf("%s",ch2);
    
}